<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>io.jenkins.jenkinsfile-runner</groupId>
    <artifactId>parent</artifactId>
    <version>${revision}${changelist}</version>
  </parent>

  <!-- TODO: Consider switching to a Plugin Parent POM -->
  <artifactId>payload-dependencies</artifactId>
  <name>Jenkinsfile Runner: Plugin dependencies</name>
  <description>Declares a minimum set of plugins required for Jenkinsfile Runner execution</description>
  <packaging>hpi</packaging>

  <properties>
    <!-- There is nothing to test here -->
    <skipTests>true</skipTests>
  </properties>

  <!--
    Payload needs to depend on the presence of many other plugins,
    but they are only used during the compilation, and we don't ship them to runtime.
    Having all the dependencies under payload-dependencies makes it easier to exclude
    all such dependencies from assembly.
  -->
  <dependencies>
    <dependency>
      <groupId>org.jenkins-ci.main</groupId>
      <artifactId>jenkins-core</artifactId>
      <version>${jenkins.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-cps</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-job</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-multibranch</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-scm-step</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-basic-steps</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-durable-task-step</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-support</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>script-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>scm-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.jenkins</groupId>
      <artifactId>configuration-as-code</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkinsci.plugins</groupId>
      <artifactId>pipeline-model-definition</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.jenkins-ci.plugins</groupId>
          <artifactId>git-server</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jenkinsci.plugins</groupId>
      <artifactId>pipeline-model-api</artifactId>
      <exclusions>
        <exclusion>
          <groupId>com.fasterxml.jackson.datatype</groupId>
          <artifactId>jackson-datatype-json-org</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>jackson2-api</artifactId>
    </dependency>

    <!-- For injected tests, when we decide to enable them -->
    <dependency>
      <groupId>org.jenkins-ci.main</groupId>
      <artifactId>jenkins-war</artifactId>
      <version>${jenkins.version}</version>
      <type>executable-war</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.main</groupId>
      <artifactId>jenkins-test-harness</artifactId>
      <version>${jenkins-test-harness.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci</groupId>
      <artifactId>test-annotations</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.jenkins-ci.tools</groupId>
        <artifactId>maven-hpi-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <showDeprecation>true</showDeprecation>
          <webApp>
            <contextPath>/jenkins</contextPath>
          </webApp>
          <minimumJavaVersion>1.${java.level}</minimumJavaVersion>
          <systemProperties>
            <hudson.Main.development>${hudson.Main.development}</hudson.Main.development>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
